﻿using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lamex.mIE.Calculate
{
    public class LGC_VAL_BOM_P71
    {
        public static DataTable LGC_VAL_BOM_P71_VALUE(string DWG_No, string Part_No, string Process_Code, string WORKTIME_LOGIC_CODE)
        {
            string errorMsg = DWG_No + Part_No + Process_Code;
            try
            {
                DataTable dtFeature_List = Common.GetTable.GetTable_Feature();
                DataRow dr = dtFeature_List.NewRow();
                dr["DWG_NO"] = DWG_No;
                dr["PART_NO"] = Part_No;
                dr["PROCESS_CODE"] = Process_Code;
                dr["FEATURE_NAME"] = "P71_屏风配套";
                dr["FEAT_VALUE"] = 1;
                dr["LABOR_VALUE"] = Calculate.LGC_TIM_VTA.LGC_TIM_VTA_VALUE(DWG_No, Part_No, "P71_屏风配套", "", 1);//根据特征定义表工时字段计算
                dr["UPDATE_TIME"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
                dr["UPDATE_USER"] = Lamex.Common.Loginer.CurrentUser.AccountName;
                dtFeature_List.Rows.Add(dr);
                return dtFeature_List;
            }
            catch(Exception ex )
            {
                XtraMessageBox.Show(errorMsg+ex.Message);
                return null;
            }
        }
    }
}
